-- GENERATED SPELL FOR [Dark Summoner] --


function spell0_8551(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(20829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8551', 1000, 1)
end

function spell1_8551(pUnit, Event) --@Summon Zombie,Self--
pUnit:FullCastSpellOnTarget(16590,pUnit)
pUnit:RegisterEvent('Sorts_8551', 32000, 1)
end

function Sorts_8551(pUnit, Event)
local choix_sorts_8551 = math.random(0, 1)
if choix_sorts_8551 == 0 then
pUnit:RegisterEvent('spell0_8551', 1, 1)
end
if choix_sorts_8551 == 1 then
pUnit:RegisterEvent('spell1_8551', 1, 1)
end
end

function mob8551_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8551', math.random(1500, 3000), 1)
end

function mob8551_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8551_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8551_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8551, 1, 'mob8551_Action')
RegisterUnitEvent(8551, 2, 'mob8551_Leave')
RegisterUnitEvent(8551, 3, 'mob8551_Kill')
RegisterUnitEvent(8551, 4, 'mob8551_Die')
